package com.gitee.wsl.mathematics.interpolator.ext

import com.gitee.wsl.math.Math
import com.gitee.wsl.mathematics.interpolator.Ratio
import kotlin.math.absoluteValue

fun Math.abs(a: Ratio): Ratio = Ratio(a.value.absoluteValue)

fun Math.min(a: Ratio, b: Ratio): Ratio = Ratio(kotlin.math.min(a.value, b.value))

fun Math.max(a: Ratio, b: Ratio): Ratio = Ratio(kotlin.math.max(a.value, b.value))

